﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.ComponentModel;
using DoAnWeb.DTO;
using DoAnWeb.DAO;

namespace DoAnWeb.BUS
{
    public class TinKhuyenMaiBUS
    {
        private TinKhuyenMaiDAO DAO = new TinKhuyenMaiDAO();

        public BindingList<TinKhuyenMaiDTO> GetList()
        {
            return DAO.GetList();
        }

        public BindingList<TinKhuyenMaiDTO> GetList_TieuDe(string _TieuDe)
        {
            return DAO.GetList_TieuDe(_TieuDe);
        }

        public BindingList<TinKhuyenMaiDTO> GetList_ChuaXoa()
        {
            return DAO.GetList_ChuaXoa();
        }

        public BindingList<TinKhuyenMaiDTO> GetList_TenTaiKhoan(string _TenTaiKhoan)
        {
            return DAO.GetList_TenTaiKhoan(_TenTaiKhoan);
        }

        public BindingList<TinKhuyenMaiDTO> GetList_New()
        {
            return DAO.GetList_New();
        }

        public BindingList<TinKhuyenMaiDTO> GetList_Top()
        {
            return DAO.GetList_Top();
        }

        public BindingList<TinKhuyenMaiDTO> GetList_ForKind(int _MaLoaiSanPham)
        {
            return DAO.GetList_ForKind(_MaLoaiSanPham);
        }

        public TinKhuyenMaiDTO GetFromId(int _Ma)
        {
            return DAO.GetFromId(_Ma);
        }

        public bool Duyet(int _Ma)
        {
            return DAO.Duyet(_Ma);
        }

        public bool Delete(int _Ma)
        {
            return DAO.Delete(_Ma);
        }

        public bool CheckDelete(int _Ma)
        {
            return DAO.CheckDelete(_Ma);
        }

        public bool UnCheckDelete(int _Ma)
        {
            return DAO.UnCheckDelete(_Ma);
        }

        public bool Add(TinKhuyenMaiDTO _DTO)
        {
            return DAO.Add(_DTO);
        }

        public bool Update(TinKhuyenMaiDTO _DTO)
        {
            return DAO.Update(_DTO);
        }

        public int CountNumberRemain(int _Ma)
        {
            return DAO.CountNumberRemain(_Ma);
        }

        public int CountNumberSelled(int _Ma)
        {
            return DAO.CountNumberSelled(_Ma);
        }

        public int GetCount(int _Ma)
        {
            return DAO.GetCount(_Ma);
        }

    }
}